/*
 * @Author       : Hejh(3010733382@qq.com)
 * @Version      : V1.0
 * @Date         : 2024-02-20 16:57:13
 * @Description  : 日志类型对应的中文名称和icon
 */

export const logTypeArr = [
  {
    type: 'user.login',
    name: '登录',
    icon: 'denglu1',
    color: '',
    group: 'user'
  },
  {
    type: 'user.logout',
    name: '退出',
    icon: 'dengchu',
    color: '',
    group: 'user'
  },
  {
    type: 'user.register',
    name: '注册',
    icon: 'zongzhuceshu',
    color: '',
    group: 'user'
  },
  {
    type: 'user.infoUpdate',
    name: '个人信息修改',
    icon: 'gerenxinxixiugai_icon',
    color: '',
    group: 'user'
  },
  {
    type: 'user.findPwd',
    name: '密码找回',
    icon: 'zhaohuimima',
    color: '',
    group: 'user'
  },
  {
    type: 'source.mkdir',
    name: '新建文件夹',
    icon: 'xinjianwenjian1',
    color: '',
    group: 'source'
  },
  {
    type: 'source.upload',
    name: '上传文件',
    icon: 'shangchuanwenjian',
    color: '',
    group: 'source'
  },
  {
    type: 'source.move',
    name: '移动文件',
    icon: 'weibiaoti-',
    color: '',
    group: 'source'
  },
  {
    type: 'source.copy',
    name: '复制文件',
    icon: 'fuzhi2',
    color: '',
    group: 'source'
  },
  {
    type: 'source.rename',
    name: '重命名',
    icon: 'zhongmingming1',
    color: '',
    group: 'source'
  },
  {
    type: 'source.bin',
    name: '移入回收站',
    icon: 'huishouzhan_jiaodian-copy',
    color: '',
    group: 'source'
  },
  {
    type: 'source.recycle',
    name: '文件还原',
    icon: 'huanyuan-01',
    color: '',
    group: 'source'
  },
  {
    type: 'source.delete',
    name: '文件删除',
    icon: 'huishouzhan_jiaodian-copy',
    color: '',
    group: 'source'
  },
  {
    type: 'source.share.extend',
    name: '外链分享',
    icon: 'ziyuan1',
    color: '',
    group: 'source'
  },
  {
    type: 'source.share.inner',
    name: '协作分享',
    icon: 'fenxiang1',
    color: '',
    group: 'source'
  },
  {
    type: 'source.download.dir',
    name: '下载文件夹',
    icon: 'shangchuanwenjianxiazai',
    color: '',
    group: 'source'
  },
  {
    type: 'source.download.file',
    name: '下载文件',
    icon: 'shangchuanwenjianxiazai',
    color: '',
    group: 'source'
  },
  {
    type: 'dep.create',
    name: '添加部门',
    icon: 'bumenguanli-copy',
    color: '',
    group: 'backend'
  },
  {
    type: 'dep.delete',
    name: '删除部门',
    icon: 'bumenguanli-copy-2',
    color: '',
    group: 'backend'
  },
  {
    type: 'dep.update',
    name: '编辑部门',
    icon: 'bumenguanli',
    color: '',
    group: 'backend'
  },
  {
    type: 'doc.role.create',
    name: '添加文档角色',
    icon: 'bugongkaidaiquanxianwenjianjia_huaban-copy',
    color: '',
    group: 'backend'
  },
  {
    type: 'doc.role.update',
    name: '编辑文档角色',
    icon: 'bugongkaidaiquanxianwenjianjia_huaban',
    color: '',
    group: 'backend'
  },
  {
    type: 'doc.role.delete',
    name: '删除文档角色',
    icon: 'bugongkaidaiquanxianwenjianjia_huaban-copy-copy',
    color: '',
    group: 'backend'
  },
  {
    type: 'system.role.create',
    name: '添加系统角色',
    icon: 'a-Group1308-copy',
    color: '',
    group: 'backend'
  },
  {
    type: 'system.role.update',
    name: '编辑系统角色',
    icon: 'a-Group1308',
    color: '',
    group: 'backend'
  },
  {
    type: 'system.role.delete',
    name: '删除系统角色',
    icon: 'a-Group1308-copy-2',
    color: '',
    group: 'backend'
  },
  {
    type: 'admin.user.update',
    name: '编辑用户',
    icon: 'yonghuguanli-copy-3',
    color: '',
    group: 'backend'
  },
  {
    type: 'admin.user.create',
    name: '添加用户',
    icon: 'yonghuguanli-copy-2',
    color: '',
    group: 'backend'
  },
  {
    type: 'admin.user.moveToDep',
    name: '用户移动到部门',
    icon: 'weibiaoti-',
    color: '',
    group: 'backend'
  },
  {
    type: 'admin.user.copyToDep',
    name: '用户添加到部门',
    icon: 'xinjianwenjian1',
    color: '',
    group: 'backend'
  },
  {
    type: 'admin.user.removeFromDep',
    name: '从部门中移除用户',
    icon: 'yonghuguanli-copy',
    color: '',
    group: 'backend'
  },
  {
    type: 'admin.user.delete',
    name: '删除用户',
    icon: 'yonghuguanli-copy',
    color: '',
    group: 'backend'
  },
  {
    type: 'admin.user.active',
    name: '启用/禁用用户',
    icon: 'yonghuguanli-copy-copy',
    color: '',
    group: 'backend'
  }
]

export const getLogTypeName = (type: string) => {
  const log = logTypeArr.find((item) => item.type === type)
  if (!log) {
    return undefined
  } else {
    return log
  }
}
